#version 400

/////////////
//input variable
////////////
in vec3 inputPosition;
in vec3 inputTexCoord;
in vec3 inputNomal;


///////////////
//output variable
//////////////
out vec2 texCoord;
out vec3 normal;


//////////////
//uniform variable
/////////////
uniform mat4 worldMatrix;
uniform mat4 viewMatrix;
uniform mat4 projectionMatrix;

////////////////
//Vertex Shader
///////////////
void main()
{
	gl_Position = worldMatrix * vec4(inputPosition,1.0);
	gl_Position = viewMatrix * gl_Position;
	gl_Position = projectionMatrix * gl_Position;
	
	texCoord = vec2(inputTexCoord);
	normal = mat3(worldMatrix) * inputNomal;
	normal = normalize(normal);		
}
